import request from '@/utils/request'

// 查询货物运单列表
export function listOrder(query) {
  return request({
    url: '/system/order/list',
    method: 'get',
    params: query
  })
}

// 查询货物运单详细
export function getOrder(id) {
  return request({
    url: '/system/order/' + id,
    method: 'get'
  })
}

// 新增货物运单
export function addOrder(data) {
  return request({
    url: '/system/order',
    method: 'post',
    data: data
  })
}

// 修改货物运单
export function updateOrder(data) {
  return request({
    url: '/system/order',
    method: 'put',
    data: data
  })
}

// 删除货物运单
export function delOrder(id) {
  return request({
    url: '/system/order/' + id,
    method: 'delete'
  })
}


// 獲取物流列表
export function getLogisticsInfoList() {
  return request({
    url: '/logistics/info/list/',
    method: 'get'
  })
}

// 获取总价
export function getDriverOrderPrice(query) {
  return request({
    url: '/system/order/driverOrderPrice/',
    method: 'get',
    params: query
  })
}

